package day07_14.day09;

import java.util.Scanner;

public class Main02 {
    public static void main(String[] args) {
        Scanner scn = new Scanner(System.in);
        int m = scn.nextInt();
        int n = scn.nextInt();
        //这个想法好眼熟一个一个分小
        System.out.println(answer(m , n));


    }
    public static int answer(int a , int b){
        if ((a == 1 && b != 1) || (b == 1 && a != 1)){
            return a + b;
        }else {
            return answer(a - 1 , b) + answer(a , b-1);
        }
    }
}
